package com.test.demo.provider;

import com.alibaba.dubbo.config.annotation.Service;
import com.test.demo.dubboapi.UserApi;
import com.test.demo.pojo.User;
import com.test.demo.service.UserService;
import com.test.demo.service.UserUpdateService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@Service(version = "1.0.0")
public class UserProvider implements UserApi {

    @Autowired
    private UserService userService;

    @Autowired
    private UserUpdateService userUpdateService;

    @Override
    public List<User> qryList() {
        return userService.qryUserList();
    }

    @Override
    public Boolean update(Long id) throws Exception {
        return userUpdateService.update(id);
    }
}
